Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODPersistentObject


InitPersistentObject

The InitPersistentObject method initializes this newly created persistent object.

void InitPersistentObject (in ODStorageUnit storageUnit);
storageUnit
A reference to a storage unit of this persistent object.
DISCUSSION
Your part editor should never call this method directly; it is called automatically whenever a persistent object is created for the first time. Every existing OpenDoc subclass of ODPersistentObject (including ODPart) has an initialization method that calls the inherited InitPersistentObject method at the beginning of its implementation.

For example, the initialization method of ODPart is the InitPart method. When you call the draft's CreatePart method to create a part of your class, that factory method calls your part's InitPart method. Your part's InitPart method should call the inherited InitPart method, which calls the InitPersistentObject method.

The InitPersistentObject method is not called when a stored object is re-created. Instead, the InitPersistentObjectFromStorage method is called to restore the object to its state at the time it was last saved.

SEE ALSO
The ODPart::InitPart method (page 528).
The ODPersistentObject::Externalize method (page 558).
The ODPersistentObject::InitPersistentObjectFromStorage method (page 561).
"The InitPart Method" on page 293 in OpenDoc Programmer's Guide.
"The InitPartFromStorage Method" on page 294 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help